var express = require('express');
var router = express.Router();
var db = require('../public/javascripts/db');

router.get('/', (req, res) => {
    var sql = "SELECT * FROM images";
    db.query(sql, (err, result) => {
        if (err) {
            throw err;
            return;
        } else {
            res.send({data: result.length})
        }
    })
})

module.exports = router;